package cn.edu.csust.coursecard.dao;

import cn.edu.csust.coursecard.dao.entity.Association;
import cn.edu.csust.coursecard.dao.entity.AssociationCategory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AssociationMapper {

    int insertAssociationSelective(Association record);

    Association selectAssociationByPrimaryKey(Integer id);

    int updateAssoiationByPrimaryKeySelective(Association record);
    
    
    int insertCategory(AssociationCategory record);
    
    
    AssociationCategory selectCategoryByPrimaryKey(Integer id);
    
    int updateCategoryByPrimaryKey(AssociationCategory record);
    
    AssociationCategory selectCategoryByName(@Param("categoryName") String categoryName);
    
    List<AssociationCategory> selectAllCategory();
    
    int deleteCategory(Integer id);
    
    List<Association> selectAssociation(@Param("categoryId") Integer categoryId);
}